home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  35.2 KB  |  1,561 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  21. __CMAPPLICATION__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  36.     include 'Files.a'
  37.     ENDIF
  38. ;        include 'OSUtils.a'                                        ;
  39. ;            include 'Memory.a'                                        ;
  40. ;        include 'Finder.a'                                            ;
  41.  
  42.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  43.     include 'Printing.a'
  44.     ENDIF
  45. ;        include 'Errors.a'                                            ;
  46. ;        include 'Dialogs.a'                                        ;
  47. ;            include 'Menus.a'                                        ;
  48. ;            include 'Controls.a'                                    ;
  49. ;            include 'Windows.a'                                    ;
  50. ;                include 'Events.a'                                    ;
  51. ;            include 'TextEdit.a'                                    ;
  52.  
  53.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  54.     include 'CMICCProfile.a'
  55.     ENDIF
  56.  
  57. gestaltColorSync20                EQU        $0200
  58.  
  59. kDefaultCMMSignature            EQU        'appl'
  60.  
  61. ; Macintosh 68K trap word 
  62. cmTrap                            EQU        $ABEE
  63.  
  64. ; PicComment IDs 
  65. cmBeginProfile                    EQU        220
  66. cmEndProfile                    EQU        221
  67. cmEnableMatching                EQU        222
  68. cmDisableMatching                EQU        223
  69. cmComment                        EQU        224
  70.  
  71. ; PicComment selectors for cmComment 
  72. cmBeginProfileSel                EQU        0
  73. cmContinueProfileSel            EQU        1
  74. cmEndProfileSel                    EQU        2
  75.  
  76. ; Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  77. cmMatchCMMType                    EQU        $00000001
  78. cmMatchApplProfileVersion        EQU        $00000002
  79. cmMatchDataType                    EQU        $00000004
  80. cmMatchDeviceType                EQU        $00000008
  81. cmMatchDeviceManufacturer        EQU        $00000010
  82. cmMatchDeviceModel                EQU        $00000020
  83. cmMatchDeviceAttributes            EQU        $00000040
  84. cmMatchFlags                    EQU        $00000080
  85. cmMatchOptions                    EQU        $00000100
  86. cmMatchWhite                    EQU        $00000200
  87. cmMatchBlack                    EQU        $00000400
  88.  
  89. ; Defines for version 2.0 CMSearchRecord.searchMask 
  90. cmMatchAnyProfile                EQU        $00000000
  91. cmMatchProfileCMMType            EQU        $00000001
  92. cmMatchProfileClass                EQU        $00000002
  93. cmMatchDataColorSpace            EQU        $00000004
  94. cmMatchProfileConnectionSpace    EQU        $00000008
  95. cmMatchManufacturer                EQU        $00000010
  96. cmMatchModel                    EQU        $00000020
  97. cmMatchAttributes                EQU        $00000040
  98. cmMatchProfileFlags                EQU        $00000080
  99.  
  100. ; Result codes 
  101. ; General Errors 
  102. cmProfileError                    EQU        -170
  103. cmMethodError                    EQU        -171
  104. cmMethodNotFound                EQU        -175                ; CMM not present 
  105. cmProfileNotFound                EQU        -176                ; Responder error 
  106. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  107. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  108. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  109. cmCantDeleteProfile                EQU        -180                ; Responder error 
  110. cmUnsupportedDataType            EQU        -181                ; Responder error 
  111. cmNoCurrentProfile                EQU        -182                ; Responder error 
  112. ; Profile Access Errors 
  113. cmElementTagNotFound            EQU        -4200
  114. cmIndexRangeErr                    EQU        -4201                ; Index out of range 
  115. cmCantDeleteElement                EQU        -4202
  116. cmFatalProfileErr                EQU        -4203
  117. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  118. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  119. ; Profile Search Errors 
  120. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  121. cmSearchError                    EQU        -4207
  122. cmErrIncompatibleProfile        EQU        -4208
  123. ; Other ColorSync Errors 
  124. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  125. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  126. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  127. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  128. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  129. ; Color Conversion Errors 
  130. cmRangeOverFlow                    EQU        -4214                ; One or more output color value overflows in color conversion 
  131. ;                                                        all input color values will still be converted, and the overflown 
  132. ;                                                        will be clipped 
  133. ; Other Profile Access Errors 
  134. cmCantCopyModifiedV1Profile        EQU        -4215                ; It is illegal to copy version 1 profiles that  
  135. ;                                                        have been modified 
  136.  
  137. ; deviceType values for ColorSync 1.0 Device Profile access 
  138. cmSystemDevice                    EQU        'sys '
  139. cmGDevice                        EQU        'gdev'
  140.  
  141. ; Commands for CMFlattenUPP(…) 
  142. cmOpenReadSpool                    EQU        1
  143. cmOpenWriteSpool                EQU        2
  144. cmReadSpool                        EQU        3
  145. cmWriteSpool                    EQU        4
  146. cmCloseSpool                    EQU        5
  147.  
  148. ; Flags for PostScript-related functions 
  149. cmPS7bit                        EQU        1
  150. cmPS8bit                        EQU        2
  151.  
  152. ; Caller-supplied progress function for Bitmap & PixMap matching routines 
  153. ; Caller-supplied filter function for Profile search 
  154. ; typedef long                 CMError
  155. ; For 1.0 and 2.0 profile header variants 
  156. ; CMAppleProfileHeader 
  157. CMAppleProfileHeader     RECORD    0
  158. cm1                         ds     CMHeader ; offset: $0 (0)
  159.                          ORG 0
  160. cm2                         ds     CM2Header ; offset: $0 (0)
  161.                          ORG 128
  162. sizeof                     EQU *            ; size:   $80 (128)
  163.                         ENDR
  164.  
  165. ; typedef union CMAppleProfileHeader  CMAppleProfileHeader
  166. ; Param for CWConcatColorWorld(…) 
  167. CMConcatProfileSet         RECORD    0
  168. keyIndex                 ds.w   1        ; offset: $0 (0)        ; Zero-based 
  169. count                     ds.w   1        ; offset: $2 (2)        ; Min 1 
  170. profileSet                 ds.l   1        ; offset: $4 (4)        ; Variable. Ordered from Source -> Dest 
  171. sizeof                     EQU *            ; size:   $8 (8)
  172.                         ENDR
  173.  
  174. ; typedef struct CMConcatProfileSet  CMConcatProfileSet
  175. ; ColorSync color data types 
  176. CMRGBColor                 RECORD    0
  177. red                         ds.w   1        ; offset: $0 (0)        ; 0..65535 
  178. green                     ds.w   1        ; offset: $2 (2)
  179. blue                     ds.w   1        ; offset: $4 (4)
  180. sizeof                     EQU *            ; size:   $6 (6)
  181.                         ENDR
  182.  
  183. ; typedef struct CMRGBColor  CMRGBColor
  184. CMCMYKColor             RECORD    0
  185. cyan                     ds.w   1        ; offset: $0 (0)        ; 0..65535 
  186. magenta                     ds.w   1        ; offset: $2 (2)
  187. yellow                     ds.w   1        ; offset: $4 (4)
  188. black                     ds.w   1        ; offset: $6 (6)
  189. sizeof                     EQU *            ; size:   $8 (8)
  190.                         ENDR
  191.  
  192. ; typedef struct CMCMYKColor  CMCMYKColor
  193. CMCMYColor                 RECORD    0
  194. cyan                     ds.w   1        ; offset: $0 (0)        ; 0..65535 
  195. magenta                     ds.w   1        ; offset: $2 (2)
  196. yellow                     ds.w   1        ; offset: $4 (4)
  197. sizeof                     EQU *            ; size:   $6 (6)
  198.                         ENDR
  199.  
  200. ; typedef struct CMCMYColor  CMCMYColor
  201. CMHLSColor                 RECORD    0
  202. hue                         ds.w   1        ; offset: $0 (0)        ; 0..65535. Fraction of circle. Red at 0 
  203. lightness                 ds.w   1        ; offset: $2 (2)        ; 0..65535 
  204. saturation                 ds.w   1        ; offset: $4 (4)        ; 0..65535 
  205. sizeof                     EQU *            ; size:   $6 (6)
  206.                         ENDR
  207.  
  208. ; typedef struct CMHLSColor  CMHLSColor
  209. CMHSVColor                 RECORD    0
  210. hue                         ds.w   1        ; offset: $0 (0)        ; 0..65535. Fraction of circle. Red at 0 
  211. saturation                 ds.w   1        ; offset: $2 (2)        ; 0..65535 
  212. value                     ds.w   1        ; offset: $4 (4)        ; 0..65535 
  213. sizeof                     EQU *            ; size:   $6 (6)
  214.                         ENDR
  215.  
  216. ; typedef struct CMHSVColor  CMHSVColor
  217. CMLabColor                 RECORD    0
  218. L                         ds.w   1        ; offset: $0 (0)        ; 0..65535 maps to 0..100 
  219. a                         ds.w   1        ; offset: $2 (2)        ; 0..65535 maps to -128..127.996 
  220. b                         ds.w   1        ; offset: $4 (4)        ; 0..65535 maps to -128..127.996 
  221. sizeof                     EQU *            ; size:   $6 (6)
  222.                         ENDR
  223.  
  224. ; typedef struct CMLabColor  CMLabColor
  225. CMLuvColor                 RECORD    0
  226. L                         ds.w   1        ; offset: $0 (0)        ; 0..65535 maps to 0..100 
  227. u                         ds.w   1        ; offset: $2 (2)        ; 0..65535 maps to -128..127.996 
  228. v                         ds.w   1        ; offset: $4 (4)        ; 0..65535 maps to -128..127.996 
  229. sizeof                     EQU *            ; size:   $6 (6)
  230.                         ENDR
  231.  
  232. ; typedef struct CMLuvColor  CMLuvColor
  233. CMYxyColor                 RECORD    0
  234. capY                     ds.w   1        ; offset: $0 (0)        ; 0..65535 maps to 0..1 
  235. x                         ds.w   1        ; offset: $2 (2)        ; 0..65535 maps to 0..1 
  236. y                         ds.w   1        ; offset: $4 (4)        ; 0..65535 maps to 0..1 
  237. sizeof                     EQU *            ; size:   $6 (6)
  238.                         ENDR
  239.  
  240. ; typedef struct CMYxyColor  CMYxyColor
  241. CMGrayColor             RECORD    0
  242. gray                     ds.w   1        ; offset: $0 (0)        ; 0..65535 
  243. sizeof                     EQU *            ; size:   $2 (2)
  244.                         ENDR
  245.  
  246. ; typedef struct CMGrayColor  CMGrayColor
  247. CMMultichannel5Color     RECORD    0
  248. components                 ds.b   5        ; offset: $0 (0)        ; 0..255 
  249.                          ORG 6
  250. sizeof                     EQU *            ; size:   $6 (6)
  251.                         ENDR
  252.  
  253. ; typedef struct CMMultichannel5Color  CMMultichannel5Color
  254. CMMultichannel6Color     RECORD    0
  255. components                 ds.b   6        ; offset: $0 (0)        ; 0..255 
  256. sizeof                     EQU *            ; size:   $6 (6)
  257.                         ENDR
  258.  
  259. ; typedef struct CMMultichannel6Color  CMMultichannel6Color
  260. CMMultichannel7Color     RECORD    0
  261. components                 ds.b   7        ; offset: $0 (0)        ; 0..255 
  262.                          ORG 8
  263. sizeof                     EQU *            ; size:   $8 (8)
  264.                         ENDR
  265.  
  266. ; typedef struct CMMultichannel7Color  CMMultichannel7Color
  267. CMMultichannel8Color     RECORD    0
  268. components                 ds.b   8        ; offset: $0 (0)        ; 0..255 
  269. sizeof                     EQU *            ; size:   $8 (8)
  270.                         ENDR
  271.  
  272. ; typedef struct CMMultichannel8Color  CMMultichannel8Color
  273. CMColor                 RECORD    0
  274. rgb                         ds     CMRGBColor ; offset: $0 (0)
  275.                          ORG 0
  276. hsv                         ds     CMHSVColor ; offset: $0 (0)
  277.                          ORG 0
  278. hls                         ds     CMHLSColor ; offset: $0 (0)
  279.                          ORG 0
  280. XYZ                         ds     CMXYZColor ; offset: $0 (0)
  281.                          ORG 0
  282. Lab                         ds     CMLabColor ; offset: $0 (0)
  283.                          ORG 0
  284. Luv                         ds     CMLuvColor ; offset: $0 (0)
  285.                          ORG 0
  286. Yxy                         ds     CMYxyColor ; offset: $0 (0)
  287.                          ORG 0
  288. cmyk                     ds     CMCMYKColor ; offset: $0 (0)
  289.                          ORG 0
  290. cmy                         ds     CMCMYColor ; offset: $0 (0)
  291.                          ORG 0
  292. gray                     ds     CMGrayColor ; offset: $0 (0)
  293.                          ORG 0
  294. mc5                         ds     CMMultichannel5Color ; offset: $0 (0)
  295.                          ORG 0
  296. mc6                         ds     CMMultichannel6Color ; offset: $0 (0)
  297.                          ORG 0
  298. mc7                         ds     CMMultichannel7Color ; offset: $0 (0)
  299.                          ORG 0
  300. mc8                         ds     CMMultichannel8Color ; offset: $0 (0)
  301.                          ORG 8
  302. sizeof                     EQU *            ; size:   $8 (8)
  303.                         ENDR
  304.  
  305. ; typedef union CMColor     CMColor
  306. CMProfileSearchRecord     RECORD    0
  307. header                     ds     CMHeader ; offset: $0 (0)
  308. fieldMask                 ds.l   1        ; offset: $40 (64)
  309. reserved                 ds.l   2        ; offset: $44 (68)
  310. sizeof                     EQU *            ; size:   $4C (76)
  311.                         ENDR
  312.  
  313. ; typedef struct CMProfileSearchRecord  CMProfileSearchRecord, **CMProfileSearchRecordHandle
  314. ; Search definition for 2.0 
  315. CMSearchRecord             RECORD    0
  316. CMMType                     ds.l   1        ; offset: $0 (0)
  317. profileClass             ds.l   1        ; offset: $4 (4)
  318. dataColorSpace             ds.l   1        ; offset: $8 (8)
  319. profileConnectionSpace     ds.l   1        ; offset: $C (12)
  320. deviceManufacturer         ds.l   1        ; offset: $10 (16)
  321. deviceModel                 ds.l   1        ; offset: $14 (20)
  322. deviceAttributes         ds.l   2        ; offset: $18 (24)
  323. profileFlags             ds.l   1        ; offset: $20 (32)
  324. searchMask                 ds.l   1        ; offset: $24 (36)
  325. filter                     ds.l   1        ; offset: $28 (40)
  326. sizeof                     EQU *            ; size:   $2C (44)
  327.                         ENDR
  328.  
  329. ; typedef struct CMSearchRecord  CMSearchRecord
  330. ; GetCWInfo structures 
  331. CMMInfoRecord             RECORD    0
  332. CMMType                     ds.l   1        ; offset: $0 (0)
  333. CMMVersion                 ds.l   1        ; offset: $4 (4)
  334. sizeof                     EQU *            ; size:   $8 (8)
  335.                         ENDR
  336.  
  337. ; typedef struct CMMInfoRecord  CMMInfoRecord
  338. CMCWInfoRecord             RECORD    0
  339. cmmCount                 ds.l   1        ; offset: $0 (0)
  340. cmmInfo                     ds.b   2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  341. sizeof                     EQU *            ; size:   $14 (20)
  342.                         ENDR
  343.  
  344. ; typedef struct CMCWInfoRecord  CMCWInfoRecord
  345.  
  346. cmNoColorPacking                EQU        $0000
  347. cmAlphaSpace                    EQU        $0080
  348. cmWord5ColorPacking                EQU        $0500
  349. cmLong8ColorPacking                EQU        $0800
  350. cmLong10ColorPacking            EQU        $0a00
  351. cmAlphaFirstPacking                EQU        $1000
  352. cmOneBitDirectPacking            EQU        $0b00
  353.  
  354. cmNoSpace                        EQU        0
  355. cmRGBSpace                        EQU        1
  356. cmCMYKSpace                        EQU        2
  357. cmHSVSpace                        EQU        3
  358. cmHLSSpace                        EQU        4
  359. cmYXYSpace                        EQU        5
  360. cmXYZSpace                        EQU        6
  361. cmLUVSpace                        EQU        7
  362. cmLABSpace                        EQU        8
  363. cmReservedSpace1                EQU        9
  364. cmGraySpace                        EQU        10
  365. cmReservedSpace2                EQU        11
  366. cmGamutResultSpace                EQU        12
  367. cmRGBASpace                        EQU        cmRGBSpace + cmAlphaSpace
  368. cmGrayASpace                    EQU        cmGraySpace + cmAlphaSpace
  369. cmRGB16Space                    EQU        cmWord5ColorPacking + cmRGBSpace
  370. cmRGB32Space                    EQU        cmLong8ColorPacking + cmRGBSpace
  371. cmARGB32Space                    EQU        cmLong8ColorPacking + cmAlphaFirstPacking + cmRGBASpace
  372. cmCMYK32Space                    EQU        cmLong8ColorPacking + cmCMYKSpace
  373. cmHSV32Space                    EQU        cmLong10ColorPacking + cmHSVSpace
  374. cmHLS32Space                    EQU        cmLong10ColorPacking + cmHLSSpace
  375. cmYXY32Space                    EQU        cmLong10ColorPacking + cmYXYSpace
  376. cmXYZ32Space                    EQU        cmLong10ColorPacking + cmXYZSpace
  377. cmLUV32Space                    EQU        cmLong10ColorPacking + cmLUVSpace
  378. cmLAB32Space                    EQU        cmLong10ColorPacking + cmLABSpace
  379. cmGamutResult1Space                EQU        cmOneBitDirectPacking + cmGamutResultSpace
  380.  
  381. ; typedef unsigned long     CMBitmapColorSpace
  382. CMBitmap                 RECORD    0
  383. image                     ds.l   1        ; offset: $0 (0)
  384. width                     ds.l   1        ; offset: $4 (4)
  385. height                     ds.l   1        ; offset: $8 (8)
  386. rowBytes                 ds.l   1        ; offset: $C (12)
  387. pixelSize                 ds.l   1        ; offset: $10 (16)
  388. space                     ds.l   1        ; offset: $14 (20)
  389. user1                     ds.l   1        ; offset: $18 (24)
  390. user2                     ds.l   1        ; offset: $1C (28)
  391. sizeof                     EQU *            ; size:   $20 (32)
  392.                         ENDR
  393.  
  394. ; typedef struct CMBitmap     CMBitmap
  395. ; Classic Print Manager Stuff 
  396.  
  397. enableColorMatchingOp            EQU        12
  398. registerProfileOp                EQU        13
  399.  
  400. ; PrGeneral parameter blocks 
  401. TEnableColorMatchingBlk RECORD    0
  402. iOpCode                     ds.w   1        ; offset: $0 (0)
  403. iError                     ds.w   1        ; offset: $2 (2)
  404. lReserved                 ds.l   1        ; offset: $4 (4)
  405. hPrint                     ds.l   1        ; offset: $8 (8)
  406. fEnableIt                 ds.b   1        ; offset: $C (12)
  407. filler                     ds.b   1        ; offset: $D (13)
  408. sizeof                     EQU *            ; size:   $E (14)
  409.                         ENDR
  410.  
  411. ; typedef struct TEnableColorMatchingBlk  TEnableColorMatchingBlk
  412. TRegisterProfileBlk     RECORD    0
  413. iOpCode                     ds.w   1        ; offset: $0 (0)
  414. iError                     ds.w   1        ; offset: $2 (2)
  415. lReserved                 ds.l   1        ; offset: $4 (4)
  416. hPrint                     ds.l   1        ; offset: $8 (8)
  417. fRegisterIt                 ds.b   1        ; offset: $C (12)
  418. filler                     ds.b   1        ; offset: $D (13)
  419. sizeof                     EQU *            ; size:   $E (14)
  420.                         ENDR
  421.  
  422. ; typedef struct TRegisterProfileBlk  TRegisterProfileBlk
  423.  
  424. cmNoProfileBase                    EQU        0
  425. cmFileBasedProfile                EQU        1
  426. cmHandleBasedProfile            EQU        2
  427. cmPtrBasedProfile                EQU        3
  428.  
  429. CMFileLocation             RECORD    0
  430. spec                     ds     FSSpec    ; offset: $0 (0)
  431. sizeof                     EQU *            ; size:   $46 (70)
  432.                         ENDR
  433.  
  434. ; typedef struct CMFileLocation  CMFileLocation
  435. CMHandleLocation         RECORD    0
  436. h                         ds.l   1        ; offset: $0 (0)
  437. sizeof                     EQU *            ; size:   $4 (4)
  438.                         ENDR
  439.  
  440. ; typedef struct CMHandleLocation  CMHandleLocation
  441. CMPtrLocation             RECORD    0
  442. p                         ds.l   1        ; offset: $0 (0)
  443. sizeof                     EQU *            ; size:   $4 (4)
  444.                         ENDR
  445.  
  446. ; typedef struct CMPtrLocation  CMPtrLocation
  447. CMProfLoc                 RECORD    0
  448. fileLoc                     ds     CMFileLocation ; offset: $0 (0)
  449.                          ORG 0
  450. handleLoc                 ds     CMHandleLocation ; offset: $0 (0)
  451.                          ORG 0
  452. ptrLoc                     ds     CMPtrLocation ; offset: $0 (0)
  453.                          ORG 70
  454. sizeof                     EQU *            ; size:   $46 (70)
  455.                         ENDR
  456.  
  457. ; typedef union CMProfLoc     CMProfLoc
  458. CMProfileLocation         RECORD    0
  459. locType                     ds.w   1        ; offset: $0 (0)
  460. u                         ds.w   35        ; offset: $2 (2)
  461. sizeof                     EQU *            ; size:   $48 (72)
  462.                         ENDR
  463.  
  464. ; typedef struct CMProfileLocation  CMProfileLocation
  465. ; Profile file and element access 
  466. ;
  467. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  468. ;
  469.     IF ¬ GENERATINGCFM THEN
  470.         Macro
  471.         _CMOpenProfile
  472.             dc.w     $203C
  473.             dc.w     $0008
  474.             dc.w     $001C
  475.             dc.w     $ABEE
  476.         EndM
  477.     ELSE
  478.         IMPORT_CFM_FUNCTION    CMOpenProfile
  479.     ENDIF
  480.  
  481. ;
  482. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  483. ;
  484.     IF ¬ GENERATINGCFM THEN
  485.         Macro
  486.         _CMCloseProfile
  487.             dc.w     $203C
  488.             dc.w     $0004
  489.             dc.w     $001D
  490.             dc.w     $ABEE
  491.         EndM
  492.     ELSE
  493.         IMPORT_CFM_FUNCTION    CMCloseProfile
  494.     ENDIF
  495.  
  496. ;
  497. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  498. ;
  499.     IF ¬ GENERATINGCFM THEN
  500.         Macro
  501.         _CMUpdateProfile
  502.             dc.w     $203C
  503.             dc.w     $0004
  504.             dc.w     $0034
  505.             dc.w     $ABEE
  506.         EndM
  507.     ELSE
  508.         IMPORT_CFM_FUNCTION    CMUpdateProfile
  509.     ENDIF
  510.  
  511. ;
  512. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  513. ;
  514.     IF ¬ GENERATINGCFM THEN
  515.         Macro
  516.         _CMNewProfile
  517.             dc.w     $203C
  518.             dc.w     $0008
  519.             dc.w     $001B
  520.             dc.w     $ABEE
  521.         EndM
  522.     ELSE
  523.         IMPORT_CFM_FUNCTION    CMNewProfile
  524.     ENDIF
  525.  
  526. ;
  527. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  528. ;
  529.     IF ¬ GENERATINGCFM THEN
  530.         Macro
  531.         _CMCopyProfile
  532.             dc.w     $203C
  533.             dc.w     $000C
  534.             dc.w     $0025
  535.             dc.w     $ABEE
  536.         EndM
  537.     ELSE
  538.         IMPORT_CFM_FUNCTION    CMCopyProfile
  539.     ENDIF
  540.  
  541. ;
  542. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  543. ;
  544.     IF ¬ GENERATINGCFM THEN
  545.         Macro
  546.         _CMGetProfileLocation
  547.             dc.w     $203C
  548.             dc.w     $0008
  549.             dc.w     $003C
  550.             dc.w     $ABEE
  551.         EndM
  552.     ELSE
  553.         IMPORT_CFM_FUNCTION    CMGetProfileLocation
  554.     ENDIF
  555.  
  556. ;
  557. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  558. ;
  559.     IF ¬ GENERATINGCFM THEN
  560.         Macro
  561.         _CMValidateProfile
  562.             dc.w     $203C
  563.             dc.w     $000C
  564.             dc.w     $0026
  565.             dc.w     $ABEE
  566.         EndM
  567.     ELSE
  568.         IMPORT_CFM_FUNCTION    CMValidateProfile
  569.     ENDIF
  570.  
  571. ;
  572. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  573. ;
  574.     IF ¬ GENERATINGCFM THEN
  575.         Macro
  576.         _CMFlattenProfile
  577.             dc.w     $203C
  578.             dc.w     $0014
  579.             dc.w     $0031
  580.             dc.w     $ABEE
  581.         EndM
  582.     ELSE
  583.         IMPORT_CFM_FUNCTION    CMFlattenProfile
  584.     ENDIF
  585.  
  586. ;
  587. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  588. ;
  589.     IF ¬ GENERATINGCFM THEN
  590.         Macro
  591.         _CMUnflattenProfile
  592.             dc.w     $203C
  593.             dc.w     $0010
  594.             dc.w     $0032
  595.             dc.w     $ABEE
  596.         EndM
  597.     ELSE
  598.         IMPORT_CFM_FUNCTION    CMUnflattenProfile
  599.     ENDIF
  600.  
  601. ;
  602. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  603. ;
  604.     IF ¬ GENERATINGCFM THEN
  605.         Macro
  606.         _CMProfileElementExists
  607.             dc.w     $203C
  608.             dc.w     $000C
  609.             dc.w     $001E
  610.             dc.w     $ABEE
  611.         EndM
  612.     ELSE
  613.         IMPORT_CFM_FUNCTION    CMProfileElementExists
  614.     ENDIF
  615.  
  616. ;
  617. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  618. ;
  619.     IF ¬ GENERATINGCFM THEN
  620.         Macro
  621.         _CMCountProfileElements
  622.             dc.w     $203C
  623.             dc.w     $0008
  624.             dc.w     $001F
  625.             dc.w     $ABEE
  626.         EndM
  627.     ELSE
  628.         IMPORT_CFM_FUNCTION    CMCountProfileElements
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  633. ;
  634.     IF ¬ GENERATINGCFM THEN
  635.         Macro
  636.         _CMGetProfileElement
  637.             dc.w     $203C
  638.             dc.w     $0010
  639.             dc.w     $0020
  640.             dc.w     $ABEE
  641.         EndM
  642.     ELSE
  643.         IMPORT_CFM_FUNCTION    CMGetProfileElement
  644.     ENDIF
  645.  
  646. ;
  647. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  648. ;
  649.     IF ¬ GENERATINGCFM THEN
  650.         Macro
  651.         _CMGetProfileHeader
  652.             dc.w     $203C
  653.             dc.w     $0008
  654.             dc.w     $0039
  655.             dc.w     $ABEE
  656.         EndM
  657.     ELSE
  658.         IMPORT_CFM_FUNCTION    CMGetProfileHeader
  659.     ENDIF
  660.  
  661. ;
  662. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  663. ;
  664.     IF ¬ GENERATINGCFM THEN
  665.         Macro
  666.         _CMGetPartialProfileElement
  667.             dc.w     $203C
  668.             dc.w     $0014
  669.             dc.w     $0036
  670.             dc.w     $ABEE
  671.         EndM
  672.     ELSE
  673.         IMPORT_CFM_FUNCTION    CMGetPartialProfileElement
  674.     ENDIF
  675.  
  676. ;
  677. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  678. ;
  679.     IF ¬ GENERATINGCFM THEN
  680.         Macro
  681.         _CMSetProfileElementSize
  682.             dc.w     $203C
  683.             dc.w     $000C
  684.             dc.w     $0038
  685.             dc.w     $ABEE
  686.         EndM
  687.     ELSE
  688.         IMPORT_CFM_FUNCTION    CMSetProfileElementSize
  689.     ENDIF
  690.  
  691. ;
  692. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  693. ;
  694.     IF ¬ GENERATINGCFM THEN
  695.         Macro
  696.         _CMSetPartialProfileElement
  697.             dc.w     $203C
  698.             dc.w     $0014
  699.             dc.w     $0037
  700.             dc.w     $ABEE
  701.         EndM
  702.     ELSE
  703.         IMPORT_CFM_FUNCTION    CMSetPartialProfileElement
  704.     ENDIF
  705.  
  706. ;
  707. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  708. ;
  709.     IF ¬ GENERATINGCFM THEN
  710.         Macro
  711.         _CMGetIndProfileElementInfo
  712.             dc.w     $203C
  713.             dc.w     $0014
  714.             dc.w     $0021
  715.             dc.w     $ABEE
  716.         EndM
  717.     ELSE
  718.         IMPORT_CFM_FUNCTION    CMGetIndProfileElementInfo
  719.     ENDIF
  720.  
  721. ;
  722. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  723. ;
  724.     IF ¬ GENERATINGCFM THEN
  725.         Macro
  726.         _CMGetIndProfileElement
  727.             dc.w     $203C
  728.             dc.w     $0010
  729.             dc.w     $0022
  730.             dc.w     $ABEE
  731.         EndM
  732.     ELSE
  733.         IMPORT_CFM_FUNCTION    CMGetIndProfileElement
  734.     ENDIF
  735.  
  736. ;
  737. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  738. ;
  739.     IF ¬ GENERATINGCFM THEN
  740.         Macro
  741.         _CMSetProfileElement
  742.             dc.w     $203C
  743.             dc.w     $0010
  744.             dc.w     $0023
  745.             dc.w     $ABEE
  746.         EndM
  747.     ELSE
  748.         IMPORT_CFM_FUNCTION    CMSetProfileElement
  749.     ENDIF
  750.  
  751. ;
  752. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  753. ;
  754.     IF ¬ GENERATINGCFM THEN
  755.         Macro
  756.         _CMSetProfileHeader
  757.             dc.w     $203C
  758.             dc.w     $0008
  759.             dc.w     $003A
  760.             dc.w     $ABEE
  761.         EndM
  762.     ELSE
  763.         IMPORT_CFM_FUNCTION    CMSetProfileHeader
  764.     ENDIF
  765.  
  766. ;
  767. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  768. ;
  769.     IF ¬ GENERATINGCFM THEN
  770.         Macro
  771.         _CMSetProfileElementReference
  772.             dc.w     $203C
  773.             dc.w     $000C
  774.             dc.w     $0035
  775.             dc.w     $ABEE
  776.         EndM
  777.     ELSE
  778.         IMPORT_CFM_FUNCTION    CMSetProfileElementReference
  779.     ENDIF
  780.  
  781. ;
  782. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  783. ;
  784.     IF ¬ GENERATINGCFM THEN
  785.         Macro
  786.         _CMRemoveProfileElement
  787.             dc.w     $203C
  788.             dc.w     $0008
  789.             dc.w     $0024
  790.             dc.w     $ABEE
  791.         EndM
  792.     ELSE
  793.         IMPORT_CFM_FUNCTION    CMRemoveProfileElement
  794.     ENDIF
  795.  
  796. ;
  797. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  798. ;
  799.     IF ¬ GENERATINGCFM THEN
  800.         Macro
  801.         _CMGetScriptProfileDescription
  802.             dc.w     $203C
  803.             dc.w     $000C
  804.             dc.w     $003E
  805.             dc.w     $ABEE
  806.         EndM
  807.     ELSE
  808.         IMPORT_CFM_FUNCTION    CMGetScriptProfileDescription
  809.     ENDIF
  810.  
  811. ; Low-level matching functions 
  812. ;
  813. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  814. ;
  815.     IF ¬ GENERATINGCFM THEN
  816.         Macro
  817.         _NCWNewColorWorld
  818.             dc.w     $203C
  819.             dc.w     $000C
  820.             dc.w     $0014
  821.             dc.w     $ABEE
  822.         EndM
  823.     ELSE
  824.         IMPORT_CFM_FUNCTION    NCWNewColorWorld
  825.     ENDIF
  826.  
  827. ;
  828. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  829. ;
  830.     IF ¬ GENERATINGCFM THEN
  831.         Macro
  832.         _CWConcatColorWorld
  833.             dc.w     $203C
  834.             dc.w     $0008
  835.             dc.w     $0015
  836.             dc.w     $ABEE
  837.         EndM
  838.     ELSE
  839.         IMPORT_CFM_FUNCTION    CWConcatColorWorld
  840.     ENDIF
  841.  
  842. ;
  843. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  844. ;
  845.     IF ¬ GENERATINGCFM THEN
  846.         Macro
  847.         _CWNewLinkProfile
  848.             dc.w     $203C
  849.             dc.w     $000C
  850.             dc.w     $0033
  851.             dc.w     $ABEE
  852.         EndM
  853.     ELSE
  854.         IMPORT_CFM_FUNCTION    CWNewLinkProfile
  855.     ENDIF
  856.  
  857. ;
  858. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  859. ;
  860.     IF ¬ GENERATINGCFM THEN
  861.         Macro
  862.         _CWDisposeColorWorld
  863.             dc.w     $203C
  864.             dc.w     $0004
  865.             dc.w     $0001
  866.             dc.w     $ABEE
  867.         EndM
  868.     ELSE
  869.         IMPORT_CFM_FUNCTION    CWDisposeColorWorld
  870.     ENDIF
  871.  
  872. ;
  873. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  874. ;
  875.     IF ¬ GENERATINGCFM THEN
  876.         Macro
  877.         _CWMatchColors
  878.             dc.w     $203C
  879.             dc.w     $000C
  880.             dc.w     $0002
  881.             dc.w     $ABEE
  882.         EndM
  883.     ELSE
  884.         IMPORT_CFM_FUNCTION    CWMatchColors
  885.     ENDIF
  886.  
  887. ;
  888. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  889. ;
  890.     IF ¬ GENERATINGCFM THEN
  891.         Macro
  892.         _CWCheckColors
  893.             dc.w     $203C
  894.             dc.w     $0010
  895.             dc.w     $0003
  896.             dc.w     $ABEE
  897.         EndM
  898.     ELSE
  899.         IMPORT_CFM_FUNCTION    CWCheckColors
  900.     ENDIF
  901.  
  902. ; Bitmap matching 
  903. ;
  904. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  905. ;
  906.     IF ¬ GENERATINGCFM THEN
  907.         Macro
  908.         _CWMatchBitmap
  909.             dc.w     $203C
  910.             dc.w     $0010
  911.             dc.w     $002C
  912.             dc.w     $ABEE
  913.         EndM
  914.     ELSE
  915.         IMPORT_CFM_FUNCTION    CWMatchBitmap
  916.     ENDIF
  917.  
  918. ;
  919. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  920. ;
  921.     IF ¬ GENERATINGCFM THEN
  922.         Macro
  923.         _CWCheckBitmap
  924.             dc.w     $203C
  925.             dc.w     $0014
  926.             dc.w     $002D
  927.             dc.w     $ABEE
  928.         EndM
  929.     ELSE
  930.         IMPORT_CFM_FUNCTION    CWCheckBitmap
  931.     ENDIF
  932.  
  933. ; Quickdraw-specific matching 
  934. ;
  935. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  936. ;
  937.     IF ¬ GENERATINGCFM THEN
  938.         Macro
  939.         _CWMatchPixMap
  940.             dc.w     $203C
  941.             dc.w     $0010
  942.             dc.w     $0004
  943.             dc.w     $ABEE
  944.         EndM
  945.     ELSE
  946.         IMPORT_CFM_FUNCTION    CWMatchPixMap
  947.     ENDIF
  948.  
  949. ;
  950. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  951. ;
  952.     IF ¬ GENERATINGCFM THEN
  953.         Macro
  954.         _CWCheckPixMap
  955.             dc.w     $203C
  956.             dc.w     $0014
  957.             dc.w     $0007
  958.             dc.w     $ABEE
  959.         EndM
  960.     ELSE
  961.         IMPORT_CFM_FUNCTION    CWCheckPixMap
  962.     ENDIF
  963.  
  964. ;
  965. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  966. ;
  967.     IF ¬ GENERATINGCFM THEN
  968.         Macro
  969.         _NCMBeginMatching
  970.             dc.w     $203C
  971.             dc.w     $000C
  972.             dc.w     $0016
  973.             dc.w     $ABEE
  974.         EndM
  975.     ELSE
  976.         IMPORT_CFM_FUNCTION    NCMBeginMatching
  977.     ENDIF
  978.  
  979. ;
  980. ; pascal void CMEndMatching(CMMatchRef myRef)
  981. ;
  982.     IF ¬ GENERATINGCFM THEN
  983.         Macro
  984.         _CMEndMatching
  985.             dc.w     $203C
  986.             dc.w     $0004
  987.             dc.w     $000B
  988.             dc.w     $ABEE
  989.         EndM
  990.     ELSE
  991.         IMPORT_CFM_FUNCTION    CMEndMatching
  992.     ENDIF
  993.  
  994. ;
  995. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  996. ;
  997.     IF ¬ GENERATINGCFM THEN
  998.         Macro
  999.         _NCMDrawMatchedPicture
  1000.             dc.w     $203C
  1001.             dc.w     $000C
  1002.             dc.w     $0017
  1003.             dc.w     $ABEE
  1004.         EndM
  1005.     ELSE
  1006.         IMPORT_CFM_FUNCTION    NCMDrawMatchedPicture
  1007.     ENDIF
  1008.  
  1009. ;
  1010. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1011. ;
  1012.     IF ¬ GENERATINGCFM THEN
  1013.         Macro
  1014.         _CMEnableMatchingComment
  1015.             dc.w     $203C
  1016.             dc.w     $0002
  1017.             dc.w     $000D
  1018.             dc.w     $ABEE
  1019.         EndM
  1020.     ELSE
  1021.         IMPORT_CFM_FUNCTION    CMEnableMatchingComment
  1022.     ENDIF
  1023.  
  1024. ;
  1025. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  1026. ;
  1027.     IF ¬ GENERATINGCFM THEN
  1028.         Macro
  1029.         _NCMUseProfileComment
  1030.             dc.w     $203C
  1031.             dc.w     $0008
  1032.             dc.w     $003B
  1033.             dc.w     $ABEE
  1034.         EndM
  1035.     ELSE
  1036.         IMPORT_CFM_FUNCTION    NCMUseProfileComment
  1037.     ENDIF
  1038.  
  1039. ; System Profile access 
  1040. ;
  1041. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1042. ;
  1043.     IF ¬ GENERATINGCFM THEN
  1044.         Macro
  1045.         _CMGetSystemProfile
  1046.             dc.w     $203C
  1047.             dc.w     $0004
  1048.             dc.w     $0018
  1049.             dc.w     $ABEE
  1050.         EndM
  1051.     ELSE
  1052.         IMPORT_CFM_FUNCTION    CMGetSystemProfile
  1053.     ENDIF
  1054.  
  1055. ;
  1056. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1057. ;
  1058.     IF ¬ GENERATINGCFM THEN
  1059.         Macro
  1060.         _CMSetSystemProfile
  1061.             dc.w     $203C
  1062.             dc.w     $0004
  1063.             dc.w     $0019
  1064.             dc.w     $ABEE
  1065.         EndM
  1066.     ELSE
  1067.         IMPORT_CFM_FUNCTION    CMSetSystemProfile
  1068.     ENDIF
  1069.  
  1070. ; External Profile Management 
  1071. ;
  1072. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  1073. ;
  1074.     IF ¬ GENERATINGCFM THEN
  1075.         Macro
  1076.         _CMNewProfileSearch
  1077.             dc.w     $203C
  1078.             dc.w     $0010
  1079.             dc.w     $0027
  1080.             dc.w     $ABEE
  1081.         EndM
  1082.     ELSE
  1083.         IMPORT_CFM_FUNCTION    CMNewProfileSearch
  1084.     ENDIF
  1085.  
  1086. ;
  1087. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  1088. ;
  1089.     IF ¬ GENERATINGCFM THEN
  1090.         Macro
  1091.         _CMUpdateProfileSearch
  1092.             dc.w     $203C
  1093.             dc.w     $000C
  1094.             dc.w     $0028
  1095.             dc.w     $ABEE
  1096.         EndM
  1097.     ELSE
  1098.         IMPORT_CFM_FUNCTION    CMUpdateProfileSearch
  1099.     ENDIF
  1100.  
  1101. ;
  1102. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1103. ;
  1104.     IF ¬ GENERATINGCFM THEN
  1105.         Macro
  1106.         _CMDisposeProfileSearch
  1107.             dc.w     $203C
  1108.             dc.w     $0004
  1109.             dc.w     $0029
  1110.             dc.w     $ABEE
  1111.         EndM
  1112.     ELSE
  1113.         IMPORT_CFM_FUNCTION    CMDisposeProfileSearch
  1114.     ENDIF
  1115.  
  1116. ;
  1117. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  1118. ;
  1119.     IF ¬ GENERATINGCFM THEN
  1120.         Macro
  1121.         _CMSearchGetIndProfile
  1122.             dc.w     $203C
  1123.             dc.w     $000C
  1124.             dc.w     $002A
  1125.             dc.w     $ABEE
  1126.         EndM
  1127.     ELSE
  1128.         IMPORT_CFM_FUNCTION    CMSearchGetIndProfile
  1129.     ENDIF
  1130.  
  1131. ;
  1132. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  1133. ;
  1134.     IF ¬ GENERATINGCFM THEN
  1135.         Macro
  1136.         _CMSearchGetIndProfileFileSpec
  1137.             dc.w     $203C
  1138.             dc.w     $000C
  1139.             dc.w     $002B
  1140.             dc.w     $ABEE
  1141.         EndM
  1142.     ELSE
  1143.         IMPORT_CFM_FUNCTION    CMSearchGetIndProfileFileSpec
  1144.     ENDIF
  1145.  
  1146. ; Utilities 
  1147. ;
  1148. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1149. ;
  1150.     IF ¬ GENERATINGCFM THEN
  1151.         Macro
  1152.         _CMGetColorSyncFolderSpec
  1153.             dc.w     $203C
  1154.             dc.w     $000C
  1155.             dc.w     $0011
  1156.             dc.w     $ABEE
  1157.         EndM
  1158.     ELSE
  1159.         IMPORT_CFM_FUNCTION    CMGetColorSyncFolderSpec
  1160.     ENDIF
  1161.  
  1162. ;
  1163. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1164. ;
  1165.     IF ¬ GENERATINGCFM THEN
  1166.         Macro
  1167.         _CMGetCWInfo
  1168.             dc.w     $203C
  1169.             dc.w     $000C
  1170.             dc.w     $001A
  1171.             dc.w     $ABEE
  1172.         EndM
  1173.     ELSE
  1174.         IMPORT_CFM_FUNCTION    CMGetCWInfo
  1175.     ENDIF
  1176.  
  1177. ; PS-related 
  1178. ;
  1179. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1180. ;
  1181.     IF ¬ GENERATINGCFM THEN
  1182.         Macro
  1183.         _CMGetPS2ColorSpace
  1184.             dc.w     $203C
  1185.             dc.w     $0014
  1186.             dc.w     $002E
  1187.             dc.w     $ABEE
  1188.         EndM
  1189.     ELSE
  1190.         IMPORT_CFM_FUNCTION    CMGetPS2ColorSpace
  1191.     ENDIF
  1192.  
  1193. ;
  1194. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1195. ;
  1196.     IF ¬ GENERATINGCFM THEN
  1197.         Macro
  1198.         _CMGetPS2ColorRenderingIntent
  1199.             dc.w     $203C
  1200.             dc.w     $0014
  1201.             dc.w     $002F
  1202.             dc.w     $ABEE
  1203.         EndM
  1204.     ELSE
  1205.         IMPORT_CFM_FUNCTION    CMGetPS2ColorRenderingIntent
  1206.     ENDIF
  1207.  
  1208. ;
  1209. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1210. ;
  1211.     IF ¬ GENERATINGCFM THEN
  1212.         Macro
  1213.         _CMGetPS2ColorRendering
  1214.             dc.w     $203C
  1215.             dc.w     $0018
  1216.             dc.w     $0030
  1217.             dc.w     $ABEE
  1218.         EndM
  1219.     ELSE
  1220.         IMPORT_CFM_FUNCTION    CMGetPS2ColorRendering
  1221.     ENDIF
  1222.  
  1223. ;
  1224. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1225. ;
  1226.     IF ¬ GENERATINGCFM THEN
  1227.         Macro
  1228.         _CMGetPS2ColorRenderingVMSize
  1229.             dc.w     $203C
  1230.             dc.w     $0010
  1231.             dc.w     $003D
  1232.             dc.w     $ABEE
  1233.         EndM
  1234.     ELSE
  1235.         IMPORT_CFM_FUNCTION    CMGetPS2ColorRenderingVMSize
  1236.     ENDIF
  1237.  
  1238. ; ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1239. ;
  1240. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1241. ;
  1242.     IF ¬ GENERATINGCFM THEN
  1243.         Macro
  1244.         _CWNewColorWorld
  1245.             dc.w     $203C
  1246.             dc.w     $000C
  1247.             dc.w     $0000
  1248.             dc.w     $ABEE
  1249.         EndM
  1250.     ELSE
  1251.         IMPORT_CFM_FUNCTION    CWNewColorWorld
  1252.     ENDIF
  1253.  
  1254. ;
  1255. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1256. ;
  1257.     IF ¬ GENERATINGCFM THEN
  1258.         Macro
  1259.         _ConcatenateProfiles
  1260.             dc.w     $203C
  1261.             dc.w     $000C
  1262.             dc.w     $000C
  1263.             dc.w     $ABEE
  1264.         EndM
  1265.     ELSE
  1266.         IMPORT_CFM_FUNCTION    ConcatenateProfiles
  1267.     ENDIF
  1268.  
  1269. ;
  1270. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1271. ;
  1272.     IF ¬ GENERATINGCFM THEN
  1273.         Macro
  1274.         _CMBeginMatching
  1275.             dc.w     $203C
  1276.             dc.w     $000C
  1277.             dc.w     $000A
  1278.             dc.w     $ABEE
  1279.         EndM
  1280.     ELSE
  1281.         IMPORT_CFM_FUNCTION    CMBeginMatching
  1282.     ENDIF
  1283.  
  1284. ;
  1285. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1286. ;
  1287.     IF ¬ GENERATINGCFM THEN
  1288.         Macro
  1289.         _CMDrawMatchedPicture
  1290.             dc.w     $203C
  1291.             dc.w     $000C
  1292.             dc.w     $0009
  1293.             dc.w     $ABEE
  1294.         EndM
  1295.     ELSE
  1296.         IMPORT_CFM_FUNCTION    CMDrawMatchedPicture
  1297.     ENDIF
  1298.  
  1299. ;
  1300. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1301. ;
  1302.     IF ¬ GENERATINGCFM THEN
  1303.         Macro
  1304.         _CMUseProfileComment
  1305.             dc.w     $203C
  1306.             dc.w     $0004
  1307.             dc.w     $0008
  1308.             dc.w     $ABEE
  1309.         EndM
  1310.     ELSE
  1311.         IMPORT_CFM_FUNCTION    CMUseProfileComment
  1312.     ENDIF
  1313.  
  1314. ;
  1315. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1316. ;
  1317.     IF ¬ GENERATINGCFM THEN
  1318.         Macro
  1319.         _CMGetProfileName
  1320.             dc.w     $203C
  1321.             dc.w     $0008
  1322.             dc.w     $000E
  1323.             dc.w     $ABEE
  1324.         EndM
  1325.     ELSE
  1326.         IMPORT_CFM_FUNCTION    CMGetProfileName
  1327.     ENDIF
  1328.  
  1329. ;
  1330. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1331. ;
  1332.     IF ¬ GENERATINGCFM THEN
  1333.         Macro
  1334.         _CMGetProfileAdditionalDataOffset
  1335.             dc.w     $203C
  1336.             dc.w     $0004
  1337.             dc.w     $000F
  1338.             dc.w     $ABEE
  1339.         EndM
  1340.     ELSE
  1341.         IMPORT_CFM_FUNCTION    CMGetProfileAdditionalDataOffset
  1342.     ENDIF
  1343.  
  1344. ; ProfileResponder functions 
  1345. ;
  1346. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1347. ;
  1348.     IF ¬ GENERATINGCFM THEN
  1349.         Macro
  1350.         _GetProfile
  1351.             dc.w     $203C
  1352.             dc.w     $0010
  1353.             dc.w     $0005
  1354.             dc.w     $ABEE
  1355.         EndM
  1356.     ELSE
  1357.         IMPORT_CFM_FUNCTION    GetProfile
  1358.     ENDIF
  1359.  
  1360. ;
  1361. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1362. ;
  1363.     IF ¬ GENERATINGCFM THEN
  1364.         Macro
  1365.         _SetProfile
  1366.             dc.w     $203C
  1367.             dc.w     $000C
  1368.             dc.w     $0006
  1369.             dc.w     $ABEE
  1370.         EndM
  1371.     ELSE
  1372.         IMPORT_CFM_FUNCTION    SetProfile
  1373.     ENDIF
  1374.  
  1375. ;
  1376. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1377. ;
  1378.     IF ¬ GENERATINGCFM THEN
  1379.         Macro
  1380.         _SetProfileDescription
  1381.             dc.w     $203C
  1382.             dc.w     $0010
  1383.             dc.w     $0010
  1384.             dc.w     $ABEE
  1385.         EndM
  1386.     ELSE
  1387.         IMPORT_CFM_FUNCTION    SetProfileDescription
  1388.     ENDIF
  1389.  
  1390. ;
  1391. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1392. ;
  1393.     IF ¬ GENERATINGCFM THEN
  1394.         Macro
  1395.         _GetIndexedProfile
  1396.             dc.w     $203C
  1397.             dc.w     $0014
  1398.             dc.w     $0012
  1399.             dc.w     $ABEE
  1400.         EndM
  1401.     ELSE
  1402.         IMPORT_CFM_FUNCTION    GetIndexedProfile
  1403.     ENDIF
  1404.  
  1405. ;
  1406. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1407. ;
  1408.     IF ¬ GENERATINGCFM THEN
  1409.         Macro
  1410.         _DeleteDeviceProfile
  1411.             dc.w     $203C
  1412.             dc.w     $000C
  1413.             dc.w     $0013
  1414.             dc.w     $ABEE
  1415.         EndM
  1416.     ELSE
  1417.         IMPORT_CFM_FUNCTION    DeleteDeviceProfile
  1418.     ENDIF
  1419.  
  1420.     IF OLDROUTINENAMES  THEN
  1421.  
  1422. kMatchCMMType                    EQU        cmMatchCMMType
  1423. kMatchApplProfileVersion        EQU        cmMatchApplProfileVersion
  1424. kMatchDataType                    EQU        cmMatchDataType
  1425. kMatchDeviceType                EQU        cmMatchDeviceType
  1426. kMatchDeviceManufacturer        EQU        cmMatchDeviceManufacturer
  1427. kMatchDeviceModel                EQU        cmMatchDeviceModel
  1428. kMatchDeviceAttributes            EQU        cmMatchDeviceAttributes
  1429. kMatchFlags                        EQU        cmMatchFlags
  1430. kMatchOptions                    EQU        cmMatchOptions
  1431. kMatchWhite                        EQU        cmMatchWhite
  1432. kMatchBlack                        EQU        cmMatchBlack
  1433.  
  1434. ; types 
  1435. ; typedef struct CMCMYKColor  CMYKColor
  1436. ; typedef CMWorldRef         CWorld
  1437. ; typedef long                 *CMGamutResult
  1438. ; functions 
  1439. ;
  1440. ; pascal void EndMatching(CMMatchRef myRef)
  1441. ;
  1442.     IF ¬ GENERATINGCFM THEN
  1443.         Macro
  1444.         _EndMatching
  1445.             dc.w     $203C
  1446.             dc.w     $0004
  1447.             dc.w     $000B
  1448.             dc.w     $ABEE
  1449.         EndM
  1450.     ELSE
  1451.         IMPORT_CFM_FUNCTION    EndMatching
  1452.     ENDIF
  1453.  
  1454. ;
  1455. ; pascal void EnableMatching(Boolean enableIt)
  1456. ;
  1457.     IF ¬ GENERATINGCFM THEN
  1458.         Macro
  1459.         _EnableMatching
  1460.             dc.w     $203C
  1461.             dc.w     $0002
  1462.             dc.w     $000D
  1463.             dc.w     $ABEE
  1464.         EndM
  1465.     ELSE
  1466.         IMPORT_CFM_FUNCTION    EnableMatching
  1467.     ENDIF
  1468.  
  1469. ;
  1470. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1471. ;
  1472.     IF ¬ GENERATINGCFM THEN
  1473.         Macro
  1474.         _GetColorSyncFolderSpec
  1475.             dc.w     $203C
  1476.             dc.w     $000C
  1477.             dc.w     $0011
  1478.             dc.w     $ABEE
  1479.         EndM
  1480.     ELSE
  1481.         IMPORT_CFM_FUNCTION    GetColorSyncFolderSpec
  1482.     ENDIF
  1483.  
  1484. ;
  1485. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1486. ;
  1487.     IF ¬ GENERATINGCFM THEN
  1488.         Macro
  1489.         _BeginMatching
  1490.             dc.w     $203C
  1491.             dc.w     $000C
  1492.             dc.w     $000A
  1493.             dc.w     $ABEE
  1494.         EndM
  1495.     ELSE
  1496.         IMPORT_CFM_FUNCTION    BeginMatching
  1497.     ENDIF
  1498.  
  1499. ;
  1500. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1501. ;
  1502.     IF ¬ GENERATINGCFM THEN
  1503.         Macro
  1504.         _DrawMatchedPicture
  1505.             dc.w     $203C
  1506.             dc.w     $000C
  1507.             dc.w     $0009
  1508.             dc.w     $ABEE
  1509.         EndM
  1510.     ELSE
  1511.         IMPORT_CFM_FUNCTION    DrawMatchedPicture
  1512.     ENDIF
  1513.  
  1514. ;
  1515. ; pascal CMError UseProfile(CMProfileHandle profile)
  1516. ;
  1517.     IF ¬ GENERATINGCFM THEN
  1518.         Macro
  1519.         _UseProfile
  1520.             dc.w     $203C
  1521.             dc.w     $0004
  1522.             dc.w     $0008
  1523.             dc.w     $ABEE
  1524.         EndM
  1525.     ELSE
  1526.         IMPORT_CFM_FUNCTION    UseProfile
  1527.     ENDIF
  1528.  
  1529. ;
  1530. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1531. ;
  1532.     IF ¬ GENERATINGCFM THEN
  1533.         Macro
  1534.         _GetProfileName
  1535.             dc.w     $203C
  1536.             dc.w     $0008
  1537.             dc.w     $000E
  1538.             dc.w     $ABEE
  1539.         EndM
  1540.     ELSE
  1541.         IMPORT_CFM_FUNCTION    GetProfileName
  1542.     ENDIF
  1543.  
  1544. ;
  1545. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1546. ;
  1547.     IF ¬ GENERATINGCFM THEN
  1548.         Macro
  1549.         _GetProfileAdditionalDataOffset
  1550.             dc.w     $203C
  1551.             dc.w     $0004
  1552.             dc.w     $000F
  1553.             dc.w     $ABEE
  1554.         EndM
  1555.     ELSE
  1556.         IMPORT_CFM_FUNCTION    GetProfileAdditionalDataOffset
  1557.     ENDIF
  1558.  
  1559.     ENDIF
  1560.     ENDIF ; __CMAPPLICATION__
  1561.